﻿/* 
 *  <copyright file="BaseShader.cs" company="Wesley Jowitt">
 *  
 *  SobrietyEngine: Copyright (c) 2011 Wesley Jowitt
 *  
 *  This software is distributed under a software license.
 *   * As of the creation time of this file, the license in use is the Microsoft Permissive License (Ms-PL) 
 *    * The license can be viewed at:
 *     * License.Txt in the root folder of this project
 *      * http://sobrietyengine.codeplex.com/license
 *       * http://www.microsoft.com/opensource/licenses.mspx
 *       
 *  </copyright>
 *   */

using System;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace SobrietyEngine.Components.Shaders
{
    public abstract class BaseShader: BaseComponent, IComponent, IShader
    {
        public Effect Effect { get; set; }

        public BaseShader()
        {
        }

        public BaseShader(Effect effect)
        {
            Effect = effect;
        }
        
        override public Type[] SupportedInterfaces()
        {
            return new Type[] { typeof(IShader) };
        }

        override public void Update(GameTime elapsedTime)
        {
        }

        abstract public void UpdatePass(GameTime elapsedTime, int pass);

        override public Boolean InitComponent()
        {
            return true;
        }


    }
}
